home *** CD-ROM | disk | FTP | other *** search
- /*
- *
- * *******************************
- * * DOpus LZH Multi-selector *
- * * *
- * * Filename Builder *
- * * *
- * * MicroTech Solutions, Inc. *
- * *******************************
- */
-
- options results
-
- address 'dopus_rexx'
- toptext "Multi-LZH AREXX by John Crookshank"
-
- count = 1
-
- address command
- return = Open(infile,"ram:infiles.txt","R")
- if return > 0 then do
- do until EOF(infile)
- name.count = ReadLn(infile)
- count = count + 1
- end
- return = close(infile)
- count = count - 1
- end
-
- address 'dopus_rexx'
- names = ""
- dirs = ""
- getselectedfiles '/' /* get all selected files with | as separator */
- names = RESULT /* put names in result variable */
- getselecteddirs '/'
- dirs = RESULT
-
- status 3 /* get window number */
- window = RESULT
- status 13 window /* get path of displayed window */
- path = RESULT
- status 14 window
- vol = RESULT
- parse var path ":" path
-
- if names = 'RESULT' & dirs = 'RESULT' then do
- request "No files selected! There's nothing for me to do."
- exit
- end
-
- if names ~= 'RESULT' then do
- do while names ~= ""
- parse var names name.count "/" names
- name.count = '"'||vol||':'||path||name.count||'"'
- count = count + 1
- end
- end
-
- if dirs ~= 'RESULT' then do
- do while dirs ~= ""
- parse var dirs name.count "/" dirs
- name.count = '"'||vol||':'||path||name.count||'/*"'
- count = count + 1
- end
- end
-
- none /* clear selected names from file list */
-
- address command
-
- return = open(outfile,"ram:infiles.txt","W")
-
- counter = 1
- do until counter = count
- return = WriteLn(outfile,name.counter)
- counter = counter + 1
- end
- return = Close(outfile)
-
- address 'dopus_rexx'
- mssg = (count-1)||' entries are now in the archive list.'
- request mssg
- exit
-